package edu.hgnc.test;


import edu.hgnc.methodOverrides.lookup.FruitPlate;
import edu.hgnc.methodOverrides.replace.OriginalDog;
import edu.hgnc.resolveBeforeInstantiation.BeforeInstantiation;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *测试创建代理代码，扩展spring的bean代理对象
 * 在对象之前，之后执行操作。
 */
public class JustTest3 {

	@Test
	public void test01(){
		System.out.println("======================================================");
		System.out.println("hello,when you see me,that's mean you are test succeed~");
		System.out.println("======================================================");
	}

	@Test
	public void test02() {
		ApplicationContext context = new ClassPathXmlApplicationContext("resolveBeforeInstantiation.xml");
		BeforeInstantiation bean = context.getBean(BeforeInstantiation.class);
		// 手动创建类代理对象
		bean.doSomething();

	}

}
